System and method for smart drag-and-drop functionality

ABSTRACT

The invention provides a system and method for providing smart file import and drag-and-drop functionality in a graphical user interface environment. As a file is dragged and dropped onto a set of folders using an explorer-like interface, the system automatically determines into which folder the file should be placed. If the folder does not already exist, then it is automatically created. A similar process can be used for file imports. The system is particularly useful for manipulating Java, Java derivative, or Java-related source files (including JAVA, JWS, CTRL, JWI, JAR, class files, etc.) in a Java application development environment, since in this type of environment the location of the file within the folder tree can be very important. Other embodiments of the invention include an icon-display mechanism which denotes to the user that the Smart Drop processing will take precedence over the normal drop behavior.

CLAIM OF PRIORITY

[0001] This application claims priority from provisional application “SYSTEM AND METHOD FOR SMART DRAG-AND-DROP FUNCTIONALITY” application Ser. No. 60/359,232 filed Feb.22, 2002, and which application is incorporated herein by reference.

COPYRIGHT NOTICE

[0002] A portion of the disclosure of this patent contains material which is subject to copyright protection. The copyright owner has obligation to the facsimile reproduction by anyone of the patent document of the patent disclosure, as is appears in the Patent and Trademark Office patent file or records, but otherwise reserves all copyrights whatsoever.

FIELD OF THE INVENTION

[0003] The invention relates generally to human-computer interfaces, and graphical user interfaces, and particularly to a system and method for providing drag-and-drop functionality in a graphical environment.

BACKGROUND

[0004] With the prevalent use of graphical user environments to assist computer users in interacting with, and getting the most out of their computer systems, one of the most common interfaces a user works with is the explorer-type tree found in such products as Windows Explorer and Xtree. The explorer-type tree (or simply the explorer tree) is used to navigate among hierarchical folders in an easy, intuitive, manner. Computer files can be moved or copied from one folder to another simply by dragging and dropping the file onto the destination folder.

[0005] The explorer tree interface has been extensively used in computer programming and integrated development environments (IDE's) to assist the programmer in placing computer files into their proper location prior to compilation, linking, or run-time deployment. This placing of files into their proper places is of particular importance when programming in Java, since different file types must typically be placed into particular locations for proper functioning of the IDE and for successful generation of Java applications. Several of these file layout and placement requirements are described in the Java™ Servlet Specification Version 2.3, Sun Microsystems, Inc., Palo Alto, Calif., U.S.A., incorporated by reference herein. The requirements for proper file location extends to other Java derivative technologies such as web services development IDE's, for development of web applications. Mechanisms which can assist the software programmer or developer in ensuring the quick and accurate placement of files are of great benefit in ensuring optimal use of the programmers time, and minimizing any inconsistencies due to misplaced file location.

SUMMARY

[0006] The invention provides a system and method for providing smart drag-and-drop functionality in a graphical user interface environment. As a file is dragged and dropped into the explorer tree and onto a folder or a file node using an explorer-like interface, normal processing occurs. However, when file is dragged and dropped into the explorer tree, but not onto a set of folders using an explorer-like interface, the system automatically determines into which folder the file should be placed. If the folder does not already exist, then it is automatically created. The system is particularly useful for manipulating Java, Java derivative, or Java-related source files (JWS, CTRL, JWI, JAR, class files, etc.) in a Java application development environment, since in this type of environment the location of the file within the folder tree can be very important. Other embodiments of the invention include an icon-display mechanism which denotes to the user that the smart drop processing of an embodiment of the invention will take precedence over the normal drop behavior.

[0007] In one embodiment, the invention comprises a method of providing a smart drag-and-drop mechanism for use in a graphical user interface environment, comprising the steps of: receiving an instruction to drop the file object into said explorer tree; determining a destination directory hierarchy; and, one of copying or moving said file object into a determined destination directory within said directory hierarchy.

[0008] In another embodiment, the invention comprises a method of providing a smart import mechanism for use in a hierarchical file system environment, comprising the steps of: receiving an instruction to import a file object into a file hierarchy; determining a destination directory hierarchy; and, one of copying or moving said file object into a determined destination directory within said directory hierarchy.

[0009] In a further embodiment, the invention comprises a system for providing a smart drag-and-drop mechanism for use in a graphical user interface environment, comprising: means for receiving an instruction to drop a file object into an explorer tree; means for determining a destination directory hierarchy; and means for one of copying or moving said file object into a determined destination directory within said directory hierarchy.

[0010] In a further embodiment, the invention comprises a system for providing a smart drag-and-drop mechanism for use in a hierarchical file system environment, comprising: means for receiving an instruction to import a file object into a file hierarchy; means for determining a destination directory hierarchy; and means for one of copying or moving said file object into a determined destination directory within said directory hierarchy.

[0011] In a further embodiment, the invention comprises a method of providing a smart drag-and-drop mechanism for use in a graphical user interface environment, comprising the steps of: (A) monitoring a file object being dragged onto an explorer tree; (B) determining if the file should be dropped using a normal drop or a smart drop; (C) receiving an instruction to drop a file object into an explorer tree; and, (D) if the file should be dropped using a smart drop, then the substeps of (D.1 ) determining a destination directory hierarchy; and, (D.2) one of copying or moving said file object into a determined destination directory within said directory hierarchy.

[0012] Additional embodiments, aspects, objects, and advantages of the invention will be evident from the specification, claims, and figures.

BRIEF DESCRIPTION OF THE DRAWINGS

[0013]FIG. 1 shows an illustration of an typical graphical explorer-like tree environment for use with the invention.

[0014]FIG. 2 shows an illustration of a normal drag-and-drop in accordance with the invention.

[0015]FIG. 3 shows an illustration of a smart drag-and-drop in accordance with the invention.

[0016]FIG. 4 is a flowchart of a smart drag-and-drop mechanism in accordance with an embodiment of the invention.

DETAILED DESCRIPTION

[0017] Generally described, the invention provides a system and method for providing smart drag-and-drop functionality in a graphical user interface environment. As a file is dragged and dropped (or simply dropped) onto a set of folders using an explorer-like interface, the system automatically determines into which folder the file should be placed. If the folder does not already exist, then it is automatically created. The system is particularly useful for manipulating Java, Java derivative, or Java-related source files (JAVA, JWS, CTRL, JWI, JAR, class files, etc.) in a Java application development environment, since in this type of environment the location of the file within the folder tree can be very important. Other embodiments of the invention include an icon-display mechanism which denotes to the user that this “smart drop” processing will take precedence over the normal drop behavior.

[0018] Java File and Folder Layout

[0019] The Java™ Servlet Specification, incorporated herein, specifies that a web application should be developed as a structured hierarchy of directories. The root of this hierarchy serves as the document root for files that are in turn part of the final application. The main purpose of this is to minimize potential conflicts in the URL name space. Within this hierarchy, a special directory or folder exists named “WEB-INF”. The WEB-INF directory contains files related to the application that are not in the document root. While the WEB-INF node is not part of the public document tree of the application, the contents of the WEB-INF directory are visible to servlet code using the get Resource and get Resource As Stream method calls on the Servlet Context. If the developer needs access to application specific configuration information or files that should not be exposed to the web client, such information or files should be placed under this directory. The contents of the WEB-INF directory include:

[0020] a /WEB-INF/web.xml deployment descriptor.

[0021] a /WEB-INF/classes/ directory for servlet and utility classes.

[0022] a /WEB-INF/lib/ area for Java ARchive (JAR) files, servlets, beans, and other utility classes useful to the web application.

[0023] The following listing of files illustrates that of a sample web application as based on the Java™ Servlet Specification: /index. html /welcome.jsp /images/welcome.gif /WEB-INF/web.xml /WEB-INF/lib/welcome_beans.jar /WEB-INF/classes/welcome_project/servlets/welcome.class

[0024] Since physical file location is important in systems such as these, the files themselves typically include package statements that define correct directories. The example JWS source file shown below illustrates the use of a package statement as it may be found within a JWS or Java file: package mypackage; import java.util.*; import java.text.*; /* Credit reporting service. @implements wsdl=“CreditReportWsdl.wsdl” */ public class CreditReport extends Service { /* Somebody requests a credit report.*/ public void requestReport (String ssn) { citi.startCustomerAnalysis (ssn); } /* * Request status report, and deliver as XML. * @operation @conversation continue @outputPart name=creditReport mimeType=“text/xml” xmlMap: : <creditReport> <bankReport>{result.bank}</bankReport> </creditReport> */

[0025] The first line of the sample file shown above includes a package identifier statement package mypackage; JWS files and similar files define classes that can live in any package, but the JWS specification enforces directory names and file names that correspond to the fully-qualified class names of generated code. Since the example JWS file shown above declares a class named “mypackage.CreditReport”, the JWS file must be located inside the web application at /mypackage/CreditReport.jws. If this file path does not match the fully-qualified class name, it will cause the system to generate a compile-time error.

[0026] Drag and Drop within the Project Browser

[0027] In an application development environment or IDE in accordance with the invention, a tree rendering of the web application file space is typically presented to the developer to allow manipulation of the development files. The tree rendering or “project tree” displays all current projects under development and is heavily used during the development process. In particular the project tree can show separate icons for each item corresponding to a particular file type, such as JWS, Java, JavaScript, CTRL, JWI, XML, HTML, JSP, GIF, JPEG, and other files. FIG. 1 shows an illustration of such a project tree as viewed by the user, including a project tree browser component 2, and an editor component 4.

[0028] Dragging to the Project Browser

[0029] Files dropped to the browser are copied into the current project. In the normal embodiment files are copied in to the directory or parent directory under the drop point. In the smart drop embodiment files are copied depending on the file type and contents. The system reacts differently in the way in which the file is handled and the location in which it is placed to best assist the developer in creating or updating a software application.

[0030] If the file extension is a Java, Java derivative, or Java-related source file, for example java,jws, ctrl, or jwi, the file is searched for a package statement, the appropriate directory structure is created in project root and the file is dropped in the package appropriate directory.

[0031] If the file extension is class the file is searched for a package statement, the appropriate directory structure is created in WEB-INF/classes directory, and the file is dropped in the package appropriate directory.

[0032] If the file extension is jar, the file is moved into the WEB-INF/lib directory.

[0033]FIG. 2 illustrates a normal drag-and-drop in accordance with the invention. As shown in FIG. 2, in the normal drop the file or folder 6 (in this example a “my domain” folder) is dragged onto a particular folder 8 and that folder (in this example the “samples” folder) is selected as the drop target. This is the normal drag-and-drop mechanism found in explorer-type interfaces.

[0034]FIG. 3 illustrates a “smart drop” in accordance with the invention. Depending on the particular embodiment or implementation employed, the smart drop feature can be configured as a manual (i.e. user-selected ) process, or as an automatic process. A manual process requires the user to signal to the system that they want to use the smart drop feature, perhaps by clicking with the right-mouse-button, or holding down the CTRL key while dragging the file object. The automatic process is perhaps more efficient. To automatically activate and use the smart drop feature, the file or folder object is simply dragged into the general area of the browser tree 12, but not over any existing folder. As the file or folder object is dragged, the system monitors it's location with respect to the underlying folder hierarchy. If the file is dragged over a specific folder, the smart drop feature is automatically turned off(i.e. the file object is not smart-dropped). If however, the file is dragged to a vacant space in the explorer tree and not over a specific folder, the smart drop feature is automatically turned on and when dropped the file is smart-dropped into the correct folder (assuming the file is of an appropriate type and there is a valid package statement).

[0035] When using the automatic smart drop feature as described above, the actual drop will not be onto a particular folder, so in the example shown in FIG. 3 no folder is visibly selected. Instead, an embodiment of the invention allows the mouse pointer icon 10 to change to indicate that a smart drop will occur. In the example shown, the icon changes to resemble a light bulb to indicate that if the file is released (dropped) at that moment, then the smart drop will be used. It will be evident that other types of icon could be used, and that embodiments of the smart drop feature can work equally well without the use of such an icon. The icon is used primarily to visibly inform the user of the operation of the smart drag-and-drop feature, but does not affect the underlying mechanism of the smart drop. Similarly as described above, to automatically activate a smart drop feature that incorporates a visible icon, the file or folder object is dragged just into the general area of the browser tree 12, but not over any existing folder. While being dragged, the system automatically displays the light bulb icon over the file or folder to denote the use of smart drop and the appropriately determined destination folder (the “samples” folder in this example).

[0036] The smart drop feature works with folders or with individual files. If the folder being dragged contains many individual files, then each file is tested and “smart-dropped” into the correct place. If there is no special designation for a file it is moved into the root folder.

[0037]FIG. 4 illustrates a flow chart of the method used by the invention to automatically create destination folders and deploy files to those folders, depending on the file type and contents. As shown in FIG. 4, in step 14 during a smart drop, or when the smart drop feature is automatically activated, the system monitors the object to be dragged. An optional step 16 allows the drag-and-drop icon to be automatically modified as the object is dragged over different folders or within the explorer tree area, or depending on the object file type. When the user signals (either through releasing the mouse button or by some other method) that the file should be dropped, the system in step 18 detects this request. The file type is determined in step 20, and if it is determined to be a Java, Java derivative, or Java-related source file (for example a java, jws, ctrl, jwi, or class file), then the system searches for a package statement within the file. Based on the information in this package statement the system, in step 22, an appropriate directory or folder structure is created. In step 24 the file is smart-dropped (i.e. either copied or moved) into the appropriately determined directory or folder. In this manner the system ensures the correct placement of Java, Java derivative, and Java-related source files (JWS, CTRL, JWI, JAR, class, etc.) in a Java IDE, in which type of environment the location of the file within the folder tree is very important.

[0038] It will be evident that while the above example applies the smart drop feature to use with Java, Java derivative, or Java-related source files, including java, jws, ctrl, jwi, and class files, the smart drop feature can be easily extended to work with any type of file and any type of system that requires smart placement of files or objects within a hierarchy of folders.

[0039] Use of the Smart Drop in a File Import Routine

[0040] While the description above describes an implementation in which the user drags and drops the files from one location to another using an explorer-type window, it will be evident that the mechanism used to create the smart drop can be incorporated into other file management functions and utilities. Particularly, in one embodiment, the smart drop feature can be included in, for example, a file import mechanism. In accordance with this embodiment only steps 20 through 24 of FIG. 4 are used. A typical implementation would allow the user to select, e.g. a “Smart File Import” feature from the desktop or menu bar. After selecting one or more files or folders to import, the system would automatically smart drop the selected files into appropriate folders. As each file is imported, the file type is determined (step 20), and if it is determined to be a Java, Java derivative, or Java-related source file, including java, jws, ctrl, jwi, or class file, then the system searches for a package statement within the file. Based on the information in this package statement the system creates an appropriate directory or folder structure (step 22). The file is then smart-dropped (or perhaps more appropriately “smart imported”) into the appropriately determined directory or folder (step 24).

[0041] The foregoing description of the present invention has been provided for the purposes of illustration and description. It is not intended to be exhaustive or to limit the invention to the precise forms disclosed. Many modifications and variations will be apparent to the practitioner skilled in the art. Particularly, it will be evident that the various smart drop and smart import mechanisms can be incorporated into other types of file management utilities beyond those described. The embodiments were chosen and described in order to best explain the principles of the invention and its practical application, thereby enabling others skilled in the art to understand the invention for various embodiments and with various modifications that are suited to the particular use contemplated. It is intended that the scope of the invention be defined by the following claims and their equivalence. 

What is claimed is:
 1. A method of providing a smart drag-and-drop mechanism for use in a graphical user interface environment, comprising the steps of: receiving an instruction to drop a file object into an explorer tree; determining a destination directory hierarchy; and, one of copying or moving said file object into a determined destination directory within said directory hierarchy.
 2. The method of claim 1 further comprising the step of: determining the type of file object being dropped.
 3. The method of claim 1 further comprising the step of: determining if the file object is one of a Java, Java derivative, or Java-related source file.
 4. The method of claim 1 further comprising the step of: searching for a package statement within said file object.
 5. The method of claim 4 further comprising the step of: using information within said package statement in said step of determining a destination directory hierarchy.
 6. The method of claim 1 further comprising the step of: creating a destination directory hierarchy if one does not already exist.
 7. A method of providing a smart import mechanism for use in a hierarchical file system environment, comprising the steps of: receiving an instruction to import a file object into a file hierarchy; determining a destination directory hierarchy; and, one of copying or moving said file object into a determined destination directory within said directory hierarchy.
 8. The method of claim 7 further comprising the step of: determining the type of file object being imported.
 9. The method of claim 7 further comprising the step of: determining if the file object is one of a Java, Java derivative, or Java-related source file.
 10. The method of claim 7 further comprising the step of: searching for a package statement within said file object.
 11. The method of claim 10 further comprising the step of: using information within said package statement in said step of determining a destination directory hierarchy.
 12. The method of claim 7 further comprising the step of: creating a destination directory hierarchy if one does not already exist.
 13. Computer readable media including instructions stored thereon which when executed cause the computer to perform the steps of: receiving an instruction to drop a file object into an explorer tree; determining a destination directory hierarchy; and, one of copying or moving said file object into a determined destination directory within said directory hierarchy.
 14. The computer readable media of claim 13 further including one or more instructions stored thereon which when executed cause the computer to perform the additional step of: determining the type of file object being dragged.
 15. The computer readable media of claim 13 further including one or more instructions stored thereon which when executed cause the computer to perform the additional step of: determining if the file object is one of a Java, Java derivative, or Java-related source file.
 16. The computer readable media of claim 13 further including one or more instructions stored thereon which when executed cause the computer to perform the additional step of: searching for a package statement within said file object.
 17. The computer readable media of claim 16 further including one or more instructions stored thereon which when executed cause the computer to perform the additional step of: using the information within said package statement in said step of determining a destination directory hierarchy.
 18. The computer readable media of claim 13 further including one or more instructions stored thereon which when executed cause the computer to perform the additional step of: creating a destination directory hierarchy if one does not already exist.
 19. Computer readable media including instructions stored thereon which when executed cause the computer to perform the steps of: receiving an instruction to import a file object into a file hierarchy; determining a destination directory hierarchy; and, one of copying or moving said file object into a determined destination directory within said directory hierarchy.
 20. The computer readable media of claim 19 further including one or more instructions stored thereon which when executed cause the computer to perform the additional step of: determining the type of file object being imported.
 21. The computer readable media of claim 19 further including one or more instructions stored thereon which when executed cause the computer to perform the additional step of: determining if the file object is one of a Java, Java derivative, or Java-related source file.
 22. The computer readable media of claim 19 further including one or more instructions stored thereon which when executed cause the computer to perform the additional step of: searching for a package statement within said file object.
 23. The computer readable media of claim 22 further including one or more instructions stored thereon which when executed cause the computer to perform the additional step of: using the information within said package statement in said step of determining a destination directory hierarchy.
 24. The computer readable media of claim 19 further including one or more instructions stored thereon which when executed cause the computer to perform the additional step of: creating a destination directory hierarchy if one does not already exist.
 25. The method of claim 1 including the step of: monitoring the file object to be dropped to a folder in the explorer tree.
 26. The computer readable media of claim 13 further including one or more instructions stored thereon which when executed cause the computer to perform the additional step of: monitoring the file object to be dropped to a folder in the explorer tree.
 27. A system for providing a smart drag-and-drop mechanism for use in a graphical user interface environment, comprising: means for receiving an instruction to drop a file object into an explorer tree; means for determining a destination directory hierarchy; and means for one of copying or moving said file object into a determined destination directory within said directory hierarchy.
 28. The system of claim 27 including: means for determining the type of file object being dropped.
 29. The system of claim 27 including: means for determining if the file object is one of a Java, Java derivative, or Java-related source file.
 30. The system of claim 27 including: means for searching for a package statement within said file object.
 31. The system of claim 30 including: means for using information within said package statement in said step of determining a destination directory hierarchy.
 32. The system of claim 27 including: means for creating a destination directory hierarchy if one does not already exist.
 33. A system for providing a smart drag-and-drop mechanism for use in a hierarchical file system environment, comprising: means for receiving an instruction to import a file object into a file hierarchy; means for determining a destination directory hierarchy; and means for one of copying or moving said file object into a determined destination directory within said directory hierarchy.
 34. The system of claim 33 including: means for determining the type of file object being dropped.
 35. The system of claim 33 including: means for determining if the file object is one of a Java, Java derivative, or Java-related source file.
 36. The system of claim 33 including: means for searching for a package statement within said file object.
 37. The system of claim 36 including: means for using information within said package statement in said step of determining a destination directory hierarchy.
 38. The system of claim 33 including: means for creating a destination directory hierarchy if one does not already exist.
 39. The method of claim 1 including: using an icon to indicate when a smart drop mechanism is being employed.
 40. The method of claim 7 including: using an icon to indicate when a smart drop mechanism is being employed.
 41. The computer readable media of claim 13 further including one or more instructions stored thereon which when executed cause the computer to perform the additional step of: using an icon to indicate when a smart drop mechanism is being employed.
 42. The computer readable media of claim 19 further including one or more instructions stored thereon which when executed cause the computer to perform the additional step of: using an icon to indicate when a smart drop mechanism is being employed.
 43. The system of claim 27 including: means for using an icon to indicate when a smart drop mechanism is being employed.
 44. The system of claim 33 including: means for using an icon to indicate when a smart drop mechanism is being employed.
 45. A method of providing a smart drag-and-drop mechanism for use in a graphical user interface environment, comprising the steps of: (A) monitoring a file object being dragged onto an explorer tree; (B) determining if the file should be dropped using a normal drop or a smart drop; (C) receiving an instruction to drop a file object into an explorer tree; and, (D) if the file should be dropped using a smart drop, then the substeps of (D.1) determining a destination directory hierarchy; and, (D.2) one of copying or moving said file object into a determined destination directory within said directory hierarchy.
 46. The method of claim 45 wherein said step of determining if the file should be dropped using a normal drop or a smart drop includes checking to see if the file object is dragged to a position over a destination folder, or not over a destination folder, and using a smart drop if the file object is dragged to a position not over a destination folder.
 47. The method of claim 45 further comprising the step of: determining the type of file object being dropped.
 48. The method of claim 45 further comprising the step of: determining if the file object is one of a Java, Java derivative, or Java-related source file.
 49. The method of claim 45 further comprising the step of: searching for a package statement within said file object.
 50. The method of claim 45 further comprising the step of: using information within said package statement in said step of determining a destination directory hierarchy.
 51. The method of claim 45 further comprising the step of: creating a destination directory hierarchy if one does not already exist. 